home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format: Get the Most Out of Your Amiga / Amiga Format - Get the Most Out of Your Amiga (1991)(Future Publishing)(GB)(Disk 2 of 2).adf / Spread / Spread.DOC < prev    next >
Text File  |  1978-06-20  |  15KB  |  345 lines

  1.  
  2.  
  3. *****************************************************************************
  4.  
  5.  
  6.     SPREAD - Tiny Amiga spreadsheet
  7.     Spread history (as if you care):
  8.  
  9.     This program grew from a notion I had, 4 years ago, that a
  10. spreadsheet would be a good tool to have, to help with certain jobs at
  11. the office. I had read about VisiCalc, and later Lotus 1-2-3, but I had
  12. never used a spreadsheet, so I designed Spread with few pre-conceived
  13. notions about how it should work. As far as I know, Spread bears little
  14. resemblance to any other spreadsheet.
  15.  
  16.     The first version of Spread was written to run on a PDP-11
  17. running RT11 or TSX, with a VT220 terminal. It was written in Decus C,
  18. it only supported fixed-12-character columns, and only what the screen
  19. could display. It was later enhanced to support a larger worksheet with
  20. scrolling, and to support a 132 column display. Spread is still used at
  21. the office almost use daily.
  22.  
  23.     When I found myself dialing in to work from my Amiga to use
  24. Spread fairly often (a long distance phone call too), I decided it was
  25. time to port the program over to the Amiga.
  26.  
  27.     The PDP-11 Spread used VT220 display controls and accepted VT220
  28. function keys. These are not completely compatible with the features of
  29. the Amiga CON: device, so I decided to re-write the user interface to
  30. make best use of the Intuition's input and output features.
  31.  
  32.     I started work on the Amiga version in early January 1988, and
  33. spent most evenings and weekends at the keyboard (my wife hated it). You
  34. have the result before you.
  35.  
  36.     Amiga Spread supports a few features the PDP11 version doesn't,
  37. specifically the ability of a text cell to overlay empty cells to the
  38. right, the ability to set the column width and decimals, it supports a
  39. larger worksheet (The PDP version must run in only 56K!), and of course
  40. the Intuition interface.
  41.  
  42.     Spread features:
  43.  
  44.     o Small 36 X 60 worksheet
  45.     o Four basic math functions, plus row and column summing
  46.     o Intuition-ized user interface
  47.     o Resizable Workbench window
  48.     o Absolute and symbolic cell references in formulas
  49.     o Worksheet editing: insert/delete row, insert/delete column
  50.     o Cell editing: cut, copy, paste, erase single cells
  51.     o Variable column width and decimal places
  52.     o Automatic or Manual recalculation
  53.  
  54.     Running Spread:
  55.  
  56.     Spread can be invoked from the CLI or launched from a Workbench
  57. icon. If launched from the Workbench, the Lattice C startup code will
  58. first open a standard input/output window, which Spread ignores. It is
  59. recommended that Spread be given a stack size of 8000. A larger stack
  60. size provides no benefit.
  61.  
  62.     If Spread is run from the CLI, you can include a command
  63. parameter specifying the name of a file which Spread will load as the
  64. current spreadsheet.
  65.  
  66.     The Spread window gives a display of (r) rows and (n) columns.
  67. The number of rows and columns depends on the current size of the
  68. display window, the width of the individual columns, and the narrow/wide
  69. font selection. The intersection of each line and column is called a
  70. cell. Cells may be empty, or they may contain text, or they may contain
  71. a formula.
  72.  
  73.     Spread currently supports 60 rows and 36 columns. This is very
  74. small by commercial product standards.
  75.  
  76.     In the window, one cell is displayed in reverse; this indicates
  77. the 'cursor'. The cursor may be moved using the arrow keys, or by
  78. pointing to a cell with the mouse pointer and clicking.
  79.  
  80.     If a movement would place the cursor on a cell which is not in
  81. the display window, the display is scrolled. The horizontal and vertical
  82. scroll bars also move the display window and the cursor.
  83.  
  84.     If a cell contains text, then the text is displayed in the
  85. window in that cell. If the text is wider than the current column's
  86. width, then the text will 'overflow' into empty cells to the right of
  87. the selected cell. If the text is so long that it would overflow into a
  88. cell that is occupied, then the text is truncated at that point.
  89.  
  90.     If a cell contains a formula, then the result of the formula is
  91. displayed in the cell in the window. Calculations are double precision
  92. floating point. The number display is initially 2 decimal places.
  93.  
  94.     The contents of a formula cell is a string in simple algebraic
  95. notation. It is evaluated according to the following rules:
  96. Multiplication ('*'), division ('/'), and modulo ('%') are performed
  97. first, from left to right; then addition ('+') and subtraction ('-')
  98. from left to right; then MAX and MIN left to right; then conditionals
  99. from left to right. The order of evauation can be forced by the use of
  100. parentheses.
  101.  
  102.     If you want a cell to simply contain a number, then make it a
  103. formula cell, and type in the number you want as the formula.
  104.  
  105.     Formula cells may be given logical names. The names can be
  106. referred to in other cells' formulas to call the value from the cell;
  107. this allows cell position changes within the display without affecting
  108. the logical sources for values in formulas. Only formula cells may be
  109. given names. The name must begin with a letter, and may contain
  110. letters and numbers. It may not contain spaces.
  111.  
  112.     Cell editing (text, formula, or name) is done in the string
  113. gadgets at the bottom of the window.
  114.  
  115.     When the cursor is on an empty cell, the entry gadgets at the
  116. bottom of the window are ghosted and cannot be selected. The "Cells"
  117. menu allows the choice of either a text cell or a formula cell. If
  118. "Cells/Edit Text cell" or "Cells/Edit Formula Cell" is chosen, then the
  119. cell type is chosen, the text gadget is enabled and activated, and the
  120. text may be entered immediately.
  121.  
  122.     When the cursor is on a text cell, the cell's text is placed in
  123. the text gadget. This gadget can be selected and the text modified.
  124.  
  125.     When the cursor is on a formula cell, the cell's formula and
  126. name are placed in the text and name gadgets. These can be selected and
  127. modified.
  128.  
  129.     If you wish to change a text cell to a forumla cell or vice
  130. versa, you must erase the current cell and define it anew. The menu
  131. entries "Edit/Cut" or "Edit/Erase" will erase the contents of a cell.
  132.  
  133.     Calculation can be set to automatic or manual. In automatic
  134. mode, whenever a formula cell is edited or any change which may effect
  135. the numeric results of other cells is performed, recalculation takes
  136. place. In manual mode, recalculation is done when the "Calculate/
  137. Evaluate" menu entry is selected, when the user presses the 'C' key, and
  138. upon loading a new spreadsheet from disk, and no other time.
  139.  
  140.     Calculation is done as follows: Each formula in the spreadsheet
  141. is solved, starting in cell R0C0 and moving down, then repeating for
  142. successive columns moving right. Cells which depend on other cells'
  143. values should be placed under or to the right of the cells which supply
  144. the values.
  145.  
  146.     If a cell must make a 'forward' reference, to a cell which will
  147. be calculated later in the spreadsheet, then calculating twice will
  148. usually result in the correct value.
  149.  
  150.     If a calculation can't be performed, the cell will display asterisks
  151. ('****.**') instead of a number. You should inspect your formula to see
  152. what is wrong. You may have left your parentheses unbalanced, or perhaps
  153. you refer to a cell name that you haven't defined. 
  154.  
  155.     Formulas
  156.  
  157.     Formulas are algebraic expressions similar to FORTRAN or BASIC
  158. expressions. Operations proceed left to right, according heirarchy
  159. (multiplication after addition, etc). Expressions may be grouped with
  160. parentheses.
  161.  
  162.     Values are included in an expression using the following
  163. notations:
  164.  
  165.     <value>    - a number, like '10', '-5', '2.34'
  166.     RmCn    - takes the value in the cell at row (m) column (n)
  167.           Special case, either (m) or (n) can be '.', which
  168.           means to use the current row/column
  169.     name    - takes the value in the cell with the given name.
  170.  
  171.     The following arithmetic operators are provided:
  172.  
  173.     +    Addition                p + q
  174.     -    Subtraction                p - q
  175.     *    Multiplication                p * q
  176.     /    Division                p / q
  177.     %    Modulo (remainder from division)    p % q
  178.     MAX    greater of two values            p MAX q
  179.     MIN    lesser of two values            p MIN q
  180.  
  181.     -    Negate                    -p
  182.     ABS    Absolute value                ABS(p), ABS p
  183.     INT    Extract integer portion            INT(p), INT p
  184.  
  185.     SUM    Sum of all cells in a row or column above/to the left of
  186.         the current cell. SUM's format:
  187.  
  188.         SUM(RmCn)
  189.  
  190.         'm' and 'n' can be:
  191.             a row/column number
  192.             '.' to specify the current row/column
  193.             '*' to specify all the rows/columns above/to
  194.                 the left
  195.         Any of the above formats for 'row' and 'col' can be
  196.         combined except R*C*, which is invalid.
  197.  
  198.     Conditional Binary operators; these are entered as binary
  199. operators (one operand on each side) and give the second operand if the
  200. conditional test on the first operand is true, otherwise they give zero:
  201.  
  202.     ?EQ    op = 0            7 ?EQ 3 = 0    0 ?EQ 3 = 3
  203.     ?NE    op not = 0        7 ?NE 3 = 3    0 ?NE 3 = 0    
  204.     ?GT    op greater than 0    7 ?GT 3 = 3    -7 ?GT 3 = 0
  205.     ?GE    op greater or equal 0    7 ?GE 3 = 3    -7 ?GE 3 = 0
  206.     ?LT    op less than 0        7 ?LT 3 = 0    -7 ?LT 3 = 3
  207.     ?LE    op less or equal 0    7 ?LE 3 = 0    -7 ?LE 3 = 3
  208.  
  209.  
  210.     Spread menu selections:
  211.  
  212.     "Project" Menu
  213.  
  214.     "Project/New": Erases the entire contents of the current
  215. spreadsheet.
  216.  
  217.     "Project/Load": Erases the entire contents of the current
  218. spreadsheet, then loads a previously-saved spreadsheet. This brings up a
  219. requester asking for the name of the file to load.
  220.  
  221.     "Project/Save": Saves the current spreadsheet into a file.
  222. Project/Save uses the same file name as the spreadsheet that was loaded,
  223. or if no file name has been specified, it puts up a requester asking for
  224. the name of the file to save to.
  225.  
  226.     "Project/Save as..": saves the current spreadsheet into a file.
  227. This puts up a requester asking for the name of the file to save to.
  228.  
  229.     "Project/Print": prints to a file a displayable image of the
  230. current spreadsheet. This puts up a requester asking for the name of the
  231. file to print to, which can be "PRT:" to print directly to the printer.
  232. (Note: background printing is not implemented, meaning that Spread will
  233. stall until the spreadsheet had been printed entirely.)
  234.  
  235.     "Project/About Spread": Try it and see.
  236.  
  237.     "Project/Quit": Leaves Spread. If a spreadsheet is loaded it
  238. will be lost; make sure you save it first if you want to keep it. The
  239. close window button in the upper left corner performs the same function.
  240.  
  241.     "Edit" Menu
  242.  
  243.     "Edit/Cut": The current cell is saved in the paste buffer, and
  244. becomes empty. (The 'current' cell is the cell the cursor is positioned
  245. on, which is displayed in reverse.)
  246.  
  247.     "Edit/Copy": The current cell is saved in the paste buffer. The
  248. current cell is not altered.
  249.  
  250.     "Edit/Paste": If the current cell is empty, then the contents of
  251. the paste buffer is placed in the current cell.
  252.  
  253.     "Edit/Erase": The current cell is made empty. It is not saved in
  254. the paste buffer, and the paste buffer is not disturbed.
  255.  
  256.     "Edit/Insert Row": The contents of all cells below and to the
  257. right of the current cell, including the current cell, are shifted one
  258. row down. The current cell and all the cells in the current row to the
  259. right are made empty.
  260.  
  261.     "Edit/Insert Col": The contents of all cells below and to the
  262. right of the current cell, including the current cell, are shifted one
  263. row to the left. The current cell and all cells below the current cell
  264. are made empty.
  265.  
  266.     "Edit/Delete Row": The contents of all cells below and to the
  267. right of the current cell are shifted one row up. The contents of the
  268. current cell, and of all cells in the current row to the right, are
  269. lost.
  270.  
  271.     "Edit/Delete Col": The contents of all cells below and to the
  272. right of the current cell are shifted one row to the left. The contents
  273. of the current cell, and of all cells in the current column below, are
  274. lost.
  275.  
  276.     Warning: If any cells use RmCn notation with actual cell numbers
  277. in a formula, and the target cell is moved by any insert or delete
  278. operation, then it's likely the formula is now incorrect. The cell name
  279. feature should be used when making references to cells in formulas, as
  280. name references are resolved regardless of cell locations.
  281.  
  282.     "Cells" Menu
  283.  
  284.     "Cells/Edit Cell Text": If the current cell is empty, it is made
  285. a text cell. The Text gadget at the bottom of the window is activated,
  286. as if you had clicked on it. Pressing the 'E' key has the same effect as
  287. "Cells/Edit Cell Text", or if the text gadget is not ghosted you may
  288. simply click on it to edit.
  289.  
  290.     "Cells/Edit Cell Formula": If the current cell is empty, it is
  291. made a formula cell. The Text gadget at the bottom of the window is
  292. activated, as if you had clicked on it. Pressing the 'F' key has the
  293. same effect as "Cells/Edit Cell Formula", or if the text gadget is not
  294. ghosted you may simply click on it to edit.
  295.  
  296.     "Cells/Edit Cell Name": The Name gadget at the bottom of the
  297. window is activated, as if you had clicked on it. Pressing the 'N' key
  298. has the same effect as "Cells/Edit Cell Name", or if the name gadget is
  299. not ghosted you may simply click on it to edit.
  300.  
  301.     "Calculate" Menu
  302.  
  303.     "Calculate/Evaluate": The formulas in the current spreadsheet
  304. are solved, and the results of the calculations are displayed in the
  305. formula cells. This is the way to cause calculation if Auto Calc is
  306. disabled, or if a calculation makes a forward referece to a cell (see
  307. 'order of calculation' above).
  308.  
  309.     "Calculate/Auto Calc": When this entry is checked, the 'auto
  310. calc' feature is enabled. Selecting this entry toggles it's state
  311. between enabled (checked) and disabled (not checked).
  312.  
  313.     "Format" Menu
  314.  
  315.     "Format/Set Column Width": This entry brings up a requester
  316. which allows you to enter the width of the current column, by the number
  317. of characters it should hold.
  318.  
  319.     "Format/Set Decimal Places": This entry brings up a requester
  320. which allows you to enter the number of digits to the right of the
  321. decimal point should be printed for formula cells in the current column.
  322.  
  323.     "Format/Set Normal Font": Selecting this entry causes Spread to
  324. use Topaz/8 for cell display.
  325.  
  326.     "Format/Set Narrow Font": Selecting this entry causes Spread to
  327. use the teeny/8 font for cell display. The teeny/8 font distributed with
  328. Spread uses 5 pixel wide character spacing, which can display up to 128
  329. characters on the 640-pixel Workbench screen, although the border
  330. imagery around the Spread window allows only about 120 characters. If
  331. the 'teeny/8' font is not in your current fonts: directory, this menu
  332. selection will be ghosted.
  333.  
  334.     If you generate your own font and call it teeny/8, or copy
  335. another existing font to teeny/8, then Spread will use it with it's
  336. metrics. It should be an 8 pixel high font, but could be a wider or
  337. narrower font, fixed spacing or proportional. Spread will adjust
  338. accordingly.
  339.  
  340.  
  341. ************************************************************************
  342.  
  343.